import store from '@/store/index'

export default {
  install(Vue) {
    Vue.directive('allow', {
      inserted: function(el, binging) {
        const points = store.state.user.userInfo.roles.points
        if (!points.includes(binging.value)) {
          el.parentNode.removeChild(el)
        } else {
          console.log('显示')
        }
      }
    })
  }
}
